exports.exportlist = ["name", "hotspot", "attr", "hasControls", "hasBorders",
  "perPixelTargetFind",
  "selectable", "hotpotslist", "__eventListeners", "hotid", "label"]
exports.fabricType = {
  circle: "fabric.Circle",
  path: "fabric.Path",
  rect: "fabric.Rect",
  polyline: "fabric.Polyline",
  polygon: "fabric.Polygon",
  point: "fabric.Point",
  line: "fabric.Line"
}
exports.deviceBaseinfo = [{
  value:"label",
  name:"显示名称",
  show:true
}]
exports.CanvasStaticBase = {
  left: 10,
  top: 10,
  fill: "#e6e6e6",
  width: 100,
  height: 100,
  strokeWidth: 0,
  stroke: "#880E4F",
  hasControls: false,
  selectable:false,
  evented:false
}
exports.action = {
  toggle: {
    name: "开关",
    type: "toggle",
    event: function () {
      return function () {
        return shEvent && shEvent.toggle.call(this, arguments)
      }
    }

  }
}
exports.drawtypelist = [
  {
    name: "点",
    type: "point"
  },
  {
    name: "连接线",
    type: "edge1"
  },
  {
    name: "线",
    type: "line"
  },
  {
    name: "矩形",
    type: "rect"
  },
  {
    name: "圆形",
    type: "circle"
  },
  {
    name: "路径",
    type: "path"
  },
  {
    name: "多边形",
    type: "polygon"
  },
  {
    name: "折线",
    type: "polyline"
  },
]
exports.events = [
  "object:rotated",
  "object:scaled",
  "object:moved",
  "object:skewed",
  "object:rotating",
  "object:scaling",
  "object:moving",
  "object:skewing",
  "selection:created",
  "selection:updated",
  "selection:cleared"
]
exports.stylelist = [
  {
    name: "设备名称",
    key: "label",
    type: 'String'
  },
  {
    name: "设备类型名称",
    key: "name",
    type: "String"
  },
  {
    name: "位置X",
    key: "left",
    type: "number"
  },
  {
    name: "位置Y",
    key: "top",
    type: "number"
  },
  {
    name: "宽",
    key: "width",
    type: "number"
  },
  {
    name: "高",
    key: "height",
    type: "number"
  },
  {
    name: "半径",
    key: "radius",
    type: "number",
    setting: {
      drawtype: "circle",
      step: 0.1
    }
  },
  {
    name: "起始角度",
    key: "startAngle",
    type: "number",
    setting: {
      drawtype: "circle",
      min: 0,
      max: 360
    },
    Outformatter: function (value) {
      return parseFloat(value * Math.PI / 180, 10)
    },
    Informatter: function (value) {
      return parseFloat(value * 180 / Math.PI, 10)
    }
  },
  {
    name: "结束角度",
    key: "endAngle",
    type: "number",
    setting: {
      drawtype: "circle",
      min: 0,
      max: 360
    },
    Outformatter: function (value) {
      return value * Math.PI / 180
    },
    Informatter: function (value) {
      return value * 180 / Math.PI
    }
  },
  {
    name: "x1",
    key: "x1",
    type: "number",
    setting: {
      drawtype: "line",
    }
  },
  {
    name: "x2",
    key: "x2",
    type: "number",
    setting: {
      drawtype: "line",
    }
  },
  {
    name: "y1",
    key: "y1",
    type: "number",
    setting: {
      drawtype: "line",
    }
  },
  {
    name: "y2",
    key: "y2",
    type: "number",
    setting: {
      drawtype: "line",
    }
  },
  {
    name: "拉伸X",
    key: "scaleX",
    type: "number",
    setting: {
      step: 0.1
    }
  },
  {
    name: "拉伸Y",
    key: "scaleY",
    type: "number",
    setting: {
      step: 0.1
    }
  },
  {
    name: "angle",
    key: "angle",
    type: "number",
    setting: {
      min: 0,
      max: 360
    }
  },
  {
    name: "边框颜色",
    key: "stroke",
    type: "color"
  },
  {
    name: "边框宽度",
    key: "strokeWidth",
    type: "number",
    setting: {
      step: 0.1
    }
  },
  {
    name: "填充颜色",
    key: "fill",
    type: "color"
  },
  {
    name: "透明度",
    key: "opacity",
    type: "number",
    setting: {
      min: 0,
      max: 1,
      step: 0.1
    }
  },
  {
    name: "显示状态",
    key: "visible",
    type: "boolean"
  },
  {
    name: "事件响应",
    key: "evented",
    type: "boolean"
  }
]
